<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
	<table cellpadding="5" cellspacing="0" width="100%">
		<tr>
		
				<td class="sp_home_title" width="100%">
					DANH SÁCH VIDEO
				</td>
				
			</td>
		</tr>
	</table>
	
	<table border="0" cellpadding="0" cellspacing="0" width="290" align="center">
		<?php
			$query = "select * from videos";
			$result = mysql_query($query);
			while($row = mysql_fetch_array($result)){
				$str_js='images/media/swfobject.js';
				$str_file1='http://localhost/vetranhtuong/'.substr($row['videopath'],3);
				$str_player2='images/media/player-viral.swf';
		?>
		<tr><td height="10"></td></tr>
		<tr>
			<td><?php echo $row['videoname'];?></td>
		</tr>
		<tr><td height="10"></td></tr>
		<tr>
			<td class="bg_tem_adv_padd">
				<script type='text/javascript' src='<?php echo $str_js ?>'></script>
				<div align="center">
				<div id='<?php echo $row['id'];?>'></div>
					<script type='text/javascript'>
					  var so = new SWFObject('<?php echo $str_player2 ?>','ply','490','326','9','#ffffff');
					  so.addParam('allowfullscreen','true');
					  so.addParam('allowscriptaccess','always');
					  so.addParam('wmode','opaque');
					  so.addVariable('file','<?php echo $str_file1 ?>');	
					  so.write('<?php echo $row['id'];?>');
					</script>
				</div>
			</td>
		</tr>
		<?php
		}
		?>
	</table>
</body>
</html>
